#字典推导式
values=['北京','深圳','广州','上海']
cities={id*100:city for id,city in zip(range(1,5),values)}
print(cities)

#统计文本中字符出现的次数
my_text = ' i love you, i love sxt, i love gaoqi'
char_count ={a:my_text.count(a) for a in my_text}
print(char_count)